#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<set>
#include<map>
#include<vector>
#include<cstring>
#include<unordered_map>
#include<unordered_set>
#define int long long 
#define x first 
#define y second 
using namespace std;
const int N = 1e5 + 10;
void solve()
{
     int a,b,c;
     int a1,b1,c1;
     cin >> a >> b >> c >> a1 >> b1 >> c1;
     if(a > a1) cout << "A" << endl;
     if(a1 > a) cout << "B" << endl;
     if(a == a1 && b > b1) cout << "A" << endl;
     if(a == a1 && b1 > b) cout << "B" << endl;
     if(a == a1 && b == b1 && c > c1) cout << "A" << endl;
     if(a == a1 && b == b1 && c1 > c) cout << "B" << endl;
}
signed main()
{
    ios::sync_with_stdio(0);
    cin.tie(0),cout.tie(0);
    int t = 1;
    while(t--) solve();
    return 0;
}